﻿@{
    ViewBag.Title = "仓库字典";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section scripts{
    <script src="~/Areas/Basic/ViewModels/basic.viewModel.searchEdit.js"></script>
    <script type="text/javascript">
        using(['validatebox','combobox']);
        var  viewModel =function(data){
            basic.viewModel.searchEdit.apply(this, arguments);//继承Senv.viewModel.edit
        };
        var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
        ko.bindingViewModel(new viewModel(data));

    </script>
}
<div class="z-toolbar">
    <a id="a_refresh" href="#" plain="true" class="easyui-linkbutton" icon="icon-arrow_refresh" title="刷新" data-bind="click:refreshClick">刷新</a>
    <a id="a_add" href="#" plain="true" class="easyui-linkbutton" icon="icon-add" title="新增" data-bind="click:addClick">新增</a>
    <a id="a_edit" href="#" plain="true" class="easyui-linkbutton" icon="icon-edit" data-bind="click:editClick" title="编辑">编辑</a>
    <a id="a_del" href="#" plain="true" class="easyui-linkbutton" icon="icon-cross" title="删除" data-bind="click:deleteClick">删除</a>
    <a id="a_save" href="#" plain="true" class="easyui-linkbutton" icon="icon-save" data-bind="click:saveClick" title="保存">保存</a>
</div>

<div id="condition" class="container_12" style="position:relative;">
    <div class="grid_1 lbl">仓库编号</div>
    <div class="grid_2 val"><input type="text" data-bind="value:form.Ckzd_Ckbh" class="z-txt" /></div>
    <div class="grid_1 lbl">仓库名称</div>
    <div class="grid_2 val"><input type="text" data-bind="value:form.Ckzd_Ckmc" class="z-txt" /></div>
    <div class="clear"></div>

    <div class="grid_1 lbl">仓库地点</div>
    <div class="grid_2 val"><input type="text" data-bind="value:form.Ckzd_Ckdd" class="z-txt" /></div>
    <div class="grid_1 lbl">仓库主管</div>
    <div class="grid_2 val"><input type="text" data-bind="value:form.Ckzd_Ckzg" class="z-txt" /></div>
    <div class="clear"></div>

    <div class="prefix_9" style="position:absolute;top:5px;height:0;">
        <a id="a_search" href="#" class="button button-blue" style="margin:0 15px;" data-bind="click:searchClick">查询</a>
        <a id="a_reset" href="#" class="button button-blue" data-bind="click:clearClick">清空</a>
    </div>
</div>
<table id="gridlist" data-bind="datagrid:grid" style="display:none">
    <thead>
        <tr>
            <th field="_ID" hidden = "true" ></th>
            <th field="Ckzd_Ckbh"    sortable="true" align="left"     width="90"  editor="text"                            >编号   </th>  
            <th field="Ckzd_Ckmc"    sortable="true" align="left"     width="120" editor="{type:'validatebox',options:{required:true}}">仓库名称</th>
            <th field="Ckzd_Ckdd"    sortable="true" align="left"     width="200" editor="text" >仓库地点</th>
            <th field="Ckzd_Address" sortable="true" align="left"     width="180" editor="text" >仓库地址</th>
            <th field="Ckzd_Lxdh"    sortable="true" align="left"     width="100" editor="text" >电话</th>
            <th field="Ckzd_Ckzg"    sortable="true" align="left"     width="80"  editor="text" >仓库主管</th>
            <th field="Ckzd_Email"   sortable="true" align="left"     width="80"  editor="text" >Email</th>
            <th field="Ckzd_State"   sortable="true" align="center"     width="65"  editor="{type:'checkbox',options:{on:1,off:0}}" formatter="com.formatCheckbox" >状态</th>
            <th field="Ckzd_Remark"  sortable="true" align="left"     width="300" editor="text" >备注</th>
        </tr>
    </thead>
</table>

